<!DOCTYPE html>
<html style="background-color: #F3F3F4">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>记工账本</title>
    <link href="<?php echo base_url()?>public/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url()?>public/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="<?php echo base_url()?>public/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!-- Morris -->
    <link href="<?php echo base_url()?>public/css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
    <!-- Gritter -->
    <link href="<?php echo base_url()?>public/js/plugins/gritter/jquery.gritter.css" rel="stylesheet">
    <link href="<?php echo base_url()?>public/css/animate.css" rel="stylesheet">
    <link href="<?php echo base_url()?>public/css/style.css" rel="stylesheet"></head>
<body>
    <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0;">
        <!-- <div class="navbar-header">
            <a class="navbar-minimalize minimalize-styl-2 btn btn-primary visible-xs" href="#"> <i class="fa fa-bars"></i>
            </a>
            <img alt="签到通" class="welcome-message" src="<?php echo base_url()?>public/img/logo.png"/>
        </div> -->
        <ul class="nav navbar-top-links navbar-right">
            <li>
                <span class="m-r-sm welcome-message">
                    <img alt="个人头像" style="width:30px" class="img-circle" src="<?php echo base_url()?>public/img/profile_small.jpg"/>
                    &nbsp&nbsp <strong><?php echo $_SESSION['username']?></strong>
                </span>
            </li>
           <!--  <li style="margin-left:30px">
                <span class="m-r-sm  welcome-message orangecolor">
                    <img alt="在线购买" class="img-circle" src="<?php echo base_url()?>public/img/onlinebuy.png"/>
                    在线购买
                </span>
            </li> -->
            <li style="margin-left:30px">
                <a href="<?php echo site_url('user/logout')?>"> <i class="fa fa-sign-out"></i>
                    退出
                </a>
            </li>
        </ul>

    </nav>
    <div id="wrapper">
        <nav class="navbar-default navbar-static-side" style="background-color: #2F4050" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">

                    <li>
                        <a href="<?php echo site_url('welcome/index')?>">
                            <i class="fa fa-desktop"></i>
                            <span class="nav-label">账单管理</span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            <li class="active">
                                <a href="<?php echo site_url('welcome/index/all')?>">全部账单</a>
                            </li>
<?php
                            foreach ($book as $val) {
?>
                            <li >
                                <a href="<?php echo site_url('welcome/index/'.$val->id)?>"><?php echo $val->name?></a>
                            </li>
<?php 
                            }
?>
                            
                        </ul>
                    </li>

                    <li class="active">
                        <a href="<?php echo site_url('welcome/user')?>">
                            <i class="fa fa-user"></i>
                            <span class="nav-label">用户管理</span>
                            <span class="fa arrow"></span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('welcome/order')?>">
                            <i class="fa fa-map-marker"></i>
                            <span class="nav-label">订单管理</span>
                            <span class="fa arrow"></span>
                        </a>
                    </li>
 
                   
                </ul>
            </div>
        </nav>
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row">
                <div class="col-lg-12">
                    <div class="wrapper wrapper-content">

                         
<div class="wrapper wrapper-content animated fadeInDown">

    <div class="row">
        <div class="col-lg-5">
            <div class="jumbotron">
                <h1>Peity Charts</h1>
                <p>Is a perfect library for inline graphics visualization data.</p>
                <p><a href="<?php echo site_url('welcome/excel/'.$info->id)?>" class="btn btn-primary btn-lg" role="button">打印excel</a>
                </p>
            </div>
        </div>
        <div class="col-lg-7">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Pie Charts <small>With custom colors.</small></h5>
                </div>
                <div >
                    <table class="table table-bordered white-bg">
                    <form method="post" action="<?php echo site_url('welcome/user/'.$info->id)?>">
                        <thead>
                        <tr>
                            <th width="100px">姓名</th>
                            <th><input class="form-control" type="text" name="name" value="<?php echo $info->name?>"></th>
                        </tr>
                        </thead>

                        <tbody>
                        <tr>
                            <td>
                                日薪
                            </td>
                            <td>
                                <input class="form-control" type="text" name="salary" value="<?php echo $info->salary?>">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                电话
                            </td>
                            <td>
                                <input class="form-control" type="text" name="tel" value="<?php echo $info->tel?>">
                            </td>
                        </tr>
                        <tr height="140px">
                            <td>
                                <button class="btn btn-primary btn-lg">保存</button>
                            </td>
                            <td>
                                <address>
                                <textarea id="t" placeholder="备注" name="remark" class="form-control" rows="5" style="resize : none;"></textarea>
                                </address>
                            </td>
                        </tr>
                        </tbody>
                    </form>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-7">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>出勤</h5>
                        </div>
                        <div >
                            <table class="table table-bordered white-bg">
                                <thead>
                                <tr>
                                    <th>账本</th>
                                    <th>日期</th>
                                    <th>工时</th>
                                    <th>加班</th>
                                    <th>薪酬</th>
                                    <th>加班</th>
                                </tr>
                                </thead>
                                <tbody>
            <?php
                                foreach ($work as $val) {
            ?>
                                <tr>
                                    <td>
                                        <?php echo $val->name?>
                                    </td>
                                    <td>
                                        <?php echo $val->date?>
                                    </td>
                                    <td>
                                        <?php echo $val->attendance_days?>
                                    </td>
                                    <td>
                                        <?php echo $val->a_d?>
                                    </td>
                                    <td>
                                        <?php echo $val->attendance_salary?>
                                    </td>
                                    <td>
                                        <?php echo $val->a_s?>
                                    </td>
                                </tr>
            <?php
                                }
            ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-5">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>结款</h5>
                        </div>
                        <div >
                            <table class="table table-bordered white-bg">
                                <thead>
                                <tr>
                                    <th width="200px">日期</th>
                                    <th>结款金额</th>
                                </tr>
                                </thead>
                                <tbody>
<?php
                                foreach ($payment as $val) {
?>
                                <tr>
                                    <td>
                                        <?php echo $val->date?>
                                    </td>
                                    <td>
                                        <?php echo $val->amount?>
                                    </td>
                                </tr>
<?php
                                }
?>
                                </tbody>
                            </table>

                            <table class="table table-bordered white-bg">
                                <thead>
                                <tr>
                                    <th>总薪酬</th>
                                    <th>已结款:</th>
                                    <th>未结款</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>
                                        <?php echo $attendance_salary->attendance_salary?>
                                    </td>
                                    <td>
                                        <?php echo $payment_all->amount?>
                                    </td>
                                    <td>
                                        <?php echo $attendance_salary->attendance_salary - $payment_all->amount?>
                                    </td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


                    </div>
                </div>
                <div class="footer fixed">
                    <div class="pull-right">
                        10GB of
                        <strong>250GB</strong>
                        Free.
                    </div>
                    <div>
                        <strong>Copyright</strong>
                        &copy; 2016.Company name All rights reserved. 成都钉客科技有限公司 蜀ICP备16015088号
                    </div>
                </div>
            </div>

        </div>

    </div>

<!-- Mainly scripts -->
<script src="<?php echo base_url()?>public/js/jquery-2.1.1.js"></script>
<script src="<?php echo base_url()?>public/js/bootstrap.min.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- Flot -->
<script src="<?php echo base_url()?>public/js/plugins/flot/jquery.flot.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/flot/jquery.flot.spline.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/flot/jquery.flot.resize.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/flot/jquery.flot.pie.js"></script>

<!-- Peity -->
<script src="<?php echo base_url()?>public/js/plugins/peity/jquery.peity.min.js"></script>
<script src="<?php echo base_url()?>public/js/demo/peity-demo.js"></script>

<!-- Custom and plugin javascript -->
<script src="<?php echo base_url()?>public/js/inspinia.js"></script>
<script src="<?php echo base_url()?>public/js/plugins/pace/pace.min.js"></script>

<!-- iCheck -->
<script src="<?php echo base_url()?>public/js/plugins/iCheck/icheck.min.js"></script>

<!-- jQuery UI -->
<script src="<?php echo base_url()?>public/js/plugins/jquery-ui/jquery-ui.min.js"></script>

<!-- GITTER -->
<script src="<?php echo base_url()?>public/js/plugins/gritter/jquery.gritter.min.js"></script>

<!-- EayPIE -->
<script src="<?php echo base_url()?>public/js/plugins/easypiechart/jquery.easypiechart.js"></script>

<!-- Sparkline -->
<script src="<?php echo base_url()?>public/js/plugins/sparkline/jquery.sparkline.min.js"></script>

<!-- Sparkline demo data  -->
<script src="<?php echo base_url()?>public/js/demo/sparkline-demo.js"></script>
</body>
</html>
<script type="text/javascript">
    $(function(){
        var $t = '<?php echo $info->remark?>';
        $("#t").val($t);
    })
</script>